<%@ Register TagPrefix="uc1" TagName="Pager" Src="../../UserControls/Pager.ascx" %>
<%@ Register TagPrefix="cc" Namespace="MyFramework.Web.UI.WebControls" Assembly="MyFramework.Web" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="UserList.aspx.vb" Inherits="MIMS_WRS.Web.UserList"%>
<script language="javascript">	
	function OpenCountryView(id)
	{
		var url = 'CountryView.aspx?id=' +  id;
		var title = escape('Country Detail');
		var height = 200;
		var width = 350;
		var iTop = (screen.height-height-30)/2;
		var iLeft = (screen.width-width)-250;		
		window.showModalDialog(url,'', 'dialogLeft: ' +iLeft+ 'px; dialogTop:' + iTop+ 'px; dialogHeight: ' + height + 'px; dialogWidth: ' + width + 'px; center: no; resizable: no; scroll: no; status: no;');
	}
</script>
<cc:masterpage runat="server" templatefile="~/Offices/Settings/SettingMasterPage.ascx" id="Masterpage1">
	<cc:contentregion id="crContent" runat="server">
		<a href="UserDetail.aspx">Add new User</a>
		<cc:repeater id="rptList" runat="server">
			<headertemplate>
				<table class="List">
					<thead>
						<tr>
							<td>
								Login name</td>
							<td>
								Password</td>
							<td>User type</td>
							<td>Country</td>
							<%# GetBelongedOfficeHeaderHTML() %>
						</tr>
					</thead>
					<tbody>
			</headertemplate>
			<itemtemplate>
				<tr class="ItemRow">
					<td><a href='UserDetail.aspx?uid=<%# DataBinder.Eval(Container.DataItem, "US_ID_PK")%>'><%# DataBinder.Eval(Container.DataItem, "LOGIN_NAME")%></a></td>
					<td><%# DataBinder.Eval(Container.DataItem, "FullPassword") %></td>
					<td><%# GetUserTypeHTML(DataBinder.Eval(Container.DataItem, "USER_TYPE")) %></td>
					<td><%# GetCountryHTML(DataBinder.Eval(Container.DataItem, "CountryID")) %></td>
					<%# GetBelongedOfficeHTML(DataBinder.Eval(Container.DataItem, "US_ID_PK")) %>
				</tr>
			</itemtemplate>
			<alternatingitemtemplate>
			<tr class="AlternateItemRow">
					<td><a href='UserDetail.aspx?uid=<%# DataBinder.Eval(Container.DataItem, "US_ID_PK")%>'><%# DataBinder.Eval(Container.DataItem, "LOGIN_NAME")%></a></td>
					<td><%# DataBinder.Eval(Container.DataItem, "FullPassword") %></td>
					<td><%# GetUserTypeHTML(DataBinder.Eval(Container.DataItem, "USER_TYPE")) %></td>
					<td><%# GetCountryHTML(DataBinder.Eval(Container.DataItem, "CountryID")) %> </td>
					<%# GetBelongedOfficeHTML(DataBinder.Eval(Container.DataItem, "US_ID_PK")) %>
				</tr>
			</alternatingitemtemplate>
			<footertemplate>
		</tbody>
		</table>
		</footertemplate>
			<nonetemplate>
				<tr>
					<td colspan="2">
						There is no items.
					</td>
				</tr>
			</nonetemplate>
		</cc:repeater>
		<div id="pager">
			<uc1:pager id="ucPager" runat="server"></uc1:pager></div>
	</cc:contentregion>
	<cc:contentregion id="pageTitle" runat="server">User List 
</cc:contentregion>
</cc:masterpage>
